import { getToken, removeToken } from '@/utils/cookies'
let formItems = {
  rules:{
    repetName: [
      { required: true, message: '报表名称不能为空', trigger: 'blur' }
    ],
  },
  labelPosition:'right',
  labelWidth:120,
  statusIcon:false,
  validateOnRuleChange:true,
  size:"default",
  scrollToError:true,
  items:[
    {
      prop:'title',
      label:'博客标题',
      labelWidth:80,
      inputType:'input',
      span:12,
      placeholder:'',
      clearable:true,
      disabled:false,
      prefixIcon:'',
      suffixIcon:'',
      readonly:false,
      type:'text'
    },
    {
      prop:'preface',
      label:'博客简介',
      labelWidth:80,
      inputType:'input',
      span:12,
      placeholder:'',
      clearable:true,
      disabled:false,
      prefixIcon:'',
      suffixIcon:'',
      readonly:false,
      type:'text'
    },
    {
      prop:'author',
      label:'博客作者',
      labelWidth:80,
      inputType:'input',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:false,
      prefixIcon:'',
      suffixIcon:'',
      readonly:false,
      type:'text'
    },
    {
      prop:'createTime',
      label:'创建时间',
      labelWidth:80,
      inputType:'date',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:true,
      readonly:false,
      startPlaceholder:'',
      endPlaceholder:'',
      format:'YYYY-MM-DD',
      rangeseparator:'至',
      valueFormat:'YYYY-MM-DD',
      unlinkPanels:true,
      disabledDate:null,
      type:'date'
    },
    {
      prop:'ip',
      label:'IP',
      labelWidth:80,
      inputType:'input',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:true,
      prefixIcon:'',
      suffixIcon:'',
      readonly:false,
      type:'text'
    },
    {
      prop:'address',
      label:'地址',
      labelWidth:80,
      inputType:'input',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:true,
      prefixIcon:'',
      suffixIcon:'',
      readonly:false,
      type:'text'
    },
    {
      prop:'system',
      label:'设备系统',
      labelWidth:80,
      inputType:'input',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:true,
      prefixIcon:'',
      suffixIcon:'',
      readonly:false,
      type:'text'
    },
    {
      prop:'browser',
      label:'设备浏览器',
      labelWidth:80,
      inputType:'input',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:true,
      prefixIcon:'',
      suffixIcon:'',
      readonly:false,
      type:'text'
    },
    {
      prop:'tagType',
      label:'博客标签',
      labelWidth:80,
      inputType:'select',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:false,
      readonly:false,
      multiple:false,
      collapseTags:true,
      collapseTagsTooltip:true,
      filterable:true,
      filterMethod:null,
      remote:false,
      remoteMethod:null,
      option:[]
    },
    {
      prop:'firstClass',
      label:'博客一级分类',
      labelWidth:80,
      inputType:'select',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:false,
      readonly:false,
      multiple:false,
      collapseTags:true,
      collapseTagsTooltip:true,
      filterable:true,
      filterMethod:null,
      remote:false,
      remoteMethod:null,
      option:[]
    },
    {
      prop:'secondClass',
      label:'博客二级分类',
      labelWidth:80,
      inputType:'select',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:false,
      readonly:false,
      multiple:false,
      collapseTags:true,
      collapseTagsTooltip:true,
      filterable:true,
      filterMethod:null,
      remote:false,
      remoteMethod:null,
      option:[]
    },
    {
      prop:'isSelected',
      label:'是否精选',
      labelWidth:80,
      inputType:'select',
      span:8,
      placeholder:'',
      clearable:true,
      disabled:false,
      readonly:false,
      multiple:false,
      collapseTags:true,
      collapseTagsTooltip:true,
      filterable:true,
      filterMethod:null,
      remote:false,
      remoteMethod:null,
      option:[
        {label:'是',value:'0'},
        {label:'否',value:'1'}
      ]
    },
    {
      prop:'img',
      label:'博客主图',
      labelWidth:80,
      inputType:'upload',
      span:12,
      action:'http://www.lihyweb.cn/api/upload',
      limit:1,
      headers:{
        Authorization:getToken() || '',
        type:"file"
      }
    },
    {
      prop:'content',
      label:'博客内容',
      labelWidth:80,
      inputType:'mdEditer',
      span:24,
      placeholder:'',
      clearable:true,
      disabled:false,
      prefixIcon:'',
      suffixIcon:'',
      readonly:false,
    },
  ]
}

export default formItems